package com.yuju.upload.service.impl;

import org.springframework.stereotype.Service;

import com.yuju.model.upload.UploadFileModel;
import com.yuju.upload.service.IUploadService;
import com.yuju.util.FastDFSUtils;

/**
 * 
 * 类名：UploadServiceImpl  <br />
 *
 * 功能：上传服务
 *
 * @author : xuehj <br />
 * @Date : 2017年12月29日 下午4:46:33  <br />
 * @version : 1.1 <br />
 */
@Service
public class UploadServiceImpl implements IUploadService {

	@Override
	public String uploadPic(UploadFileModel model) {
		String path = FastDFSUtils.uploadPic(model);
		if (null == path) {
			path = FastDFSUtils.uploadPic(model);
		}
		return path;
	}

	@Override
	public int delFile(String path) {
		return FastDFSUtils.delFile(path);
	}

}
